#include "stdafx.h"

void CameraStrategyFree::update(float dt)
{
	if (!camera)
	{
		return;
	}

	Input* input = Input::getSingletonPtr();
	if(!input)
	{
		return;
	}

	MoveParam param;
	input->getMove(param);

	if(input->isActionDown(ACTION_MOVE_LEFT))
	{
		camera->move(vec4f(-1, 0, 0, 1));
	}
	else if(input->isActionDown(ACTION_MOVE_RIGHT))
	{
		camera->move(vec4f(1, 0, 0, 1));
	}
	else if(input->isActionDown(ACTION_MOVE_UP))
	{
		camera->move(vec4f(0, 1, 0, 1));
	}
	else if(input->isActionDown(ACTION_MOVE_DOWN))
	{
		camera->move(vec4f(0, -1, 0, 1));
	}
}
